//
//  ViewController.m
//  搜索功能
//
//  Created by Hello Cai on 2020/10/9.
//  Copyright © 2020 Hello Cai. All rights reserved.
//

#import "ViewController.h"
#import "SearchHomeViewController.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    self.view.backgroundColor = [UIColor whiteColor];
    
    UIButton *button = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 80, 40)];
    button.center = self.view.center;
    [button setTitle:@"搜索🔍" forState:UIControlStateNormal];
    button.titleLabel.font = [UIFont systemFontOfSize:15];
    button.backgroundColor = [UIColor grayColor];
    [button addTarget:self action:@selector(searchClick) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:button];
}

-(void)searchClick{
    SearchHomeViewController *vc = [[SearchHomeViewController alloc] init];
    vc.hidesBottomBarWhenPushed = YES;
    
    [self.navigationController pushViewController:vc animated:NO];
}

@end
